package com.exp.practice.base.user.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.File;

@Controller
public class ViewController {

    @RequestMapping("/toView/{firstView}/{secondView}/{thirdView}/{fourthView}")
    public String toView(@PathVariable("firstView") String firstView,
                         @PathVariable("secondView") String secondView,
                         @PathVariable("thirdView")String thirdView,
                         @PathVariable("fourthView")String fourthView){
        return firstView+ File.separator+secondView+File.separator+thirdView+File.separator+fourthView;
    }

    @RequestMapping("/toView/{firstView}/{secondView}/{thirdView}")
    public String toView2(@PathVariable("firstView") String firstView,
                         @PathVariable("secondView") String secondView,
                         @PathVariable("thirdView")String thirdView){
        return firstView+ File.separator+secondView+File.separator+thirdView;
    }
}
